﻿using System;

namespace DataCore.DomainObjects
{
    [Serializable]
    public class Atribute : DomainObject<long>
    {
        private String _name;
        private AtributeType _atributeType;

        public Atribute()
        {
            _name = "";
        }

        public Atribute(AtributeType atributetype,String name)
        {
            _name = name;
            _atributeType = atributetype;
        }

        public String Name
        {
            get { return _name; }
            set{}
        }

        public  AtributeType AtributeType
        {
            get { return _atributeType; }
            set{}
        }

        public override int GetHashCode()
        {
            int m = 23;
            return String.Concat(m * 17,
                _name != null ? _name.GetHashCode().ToString() : "0",
                _atributeType != null ? _atributeType.GetHashCode().ToString() : "0").GetHashCode();
        }

        public override void CopyFrom(DomainObject<long> T)
        {
            throw new NotImplementedException();
        }
    }
}
